package com.kyjy.java;

import com.kyjy.anno.Hours;

/**
 * @author 黄军艳
 * @version 1.0
 * @date 2024/11/27  13:55
 */
public class Worker {
    public static void main(String[] args) {
        //通过Hours注解类型来获取Worker中的值数组对象
        Hours[] hours=Worker.class.getAnnotationsByType(Hours.class);
        //遍历数组
        for (Hours h:hours){
            System.out.println(h);
        }
    }
}
